package main

import (
	"github.com/gin-gonic/gin"
	gs "github.com/swaggo/gin-swagger"
	"github.com/swaggo/files"

	_ "github.com/go-sql-driver/mysql"
	_ "my.com/mygo/docs"
)

// @title 我的 Golang App API
// @version 1.0
// @description 我的 Golang App
// @contact.name Swagger 可描述注释格式
// @contact.url https://swaggo.github.io/swaggo.io/declarative_comments_format/general_api_info.html
// @BasePath /api/v1
// @securityDefinitions.basic  BasicAuth

func main() {
	// Default With the Logger and Recovery middleware already attached
	router := gin.Default()

	RegisterRouters(router)
	router.GET("/swagger/*any", gs.WrapHandler(swaggerFiles.Handler))

	port := "7001"
	router.Run(":" + port)
}
